package com.fattyCorps.obj.db;

import com.fattyCorps.cache.packet.PacketMap;
import com.fattyCorps.obj.cache.player.packet.Hero;
import com.fattyCorps.obj.cache.player.packet.Item;
import com.fattyCorps.obj.cache.player.packet.Mail;
import lombok.Data;

@Data
public class PlayerData implements Cloneable{
    private Integer lv;
    private Integer head;
    private Integer coin;
    private Integer guanqia;
    private String lastFreeLotteryTime;
    private Integer globalMailId;

    private PacketMap<Item> items = new PacketMap<>();
    private PacketMap<Hero> heroes = new PacketMap<>();
    private PacketMap<Mail> mails = new PacketMap<>();

    @Override
    public PlayerData clone() throws CloneNotSupportedException {
        PlayerData objClone = (PlayerData)super.clone();
        objClone.items = items.clone();
        objClone.heroes = heroes.clone();
        objClone.mails = mails.clone();
        return objClone;
    }
}
